/**
 * Created by kaki on 2017/8/25.
 */
export const rules = {
  name: [
    { required: true, message: '请输入名称', trigger: 'blur' }
/*    { min: 2, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }*/
  ],
  sex: [
    { required: true, message: '请选择性别', trigger: 'blur' }
  ],
 /* age: [
    {required: true, message: '请输入年龄'},
    ],*/
  birthday: [
    { required: true, message: '请选择生日' }
  ],
  job: [
    { required: true, message: '请输入工作信息', trigger: 'blur' }
  ],
  selectedOptions: [
    { required: true, message: '请选择地址', trigger: 'blur' }
  ],
  address: [
    { required: true, message: '请输入详细住址', trigger: 'blur' }
  ],
  saleman_uuid: [
    { required: true, message: '请选择责任会籍' }
  ],
  cards_type_id: [
    { required: true, message: '请选择卡种' }
  ],
  coach_uuid: [
    { required: true, message: '请选择责任教练' }
  ],
  mobile: [
    { required: true, message: '请填写电话号码' },
    { validator: (rule, value, callback) => {
      const myreg = /1[3578][0-9]{9}/
      if (!myreg.test(value)) {
        callback(new Error('请输入正确的手机号码'));
      } else {
        callback();
      }
    }
    }
  ]
}
